<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-169911533-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-169911533-1');
</script>

  

  
  <title>MapReduce用户接口Mapper、Reducer——job的核心 | 空城盼故人</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="google-site-verification" content="NOVpqBhVVjZHOamocUf3Grijt7xAK_Engoe_FNrxE3Q" />
  <meta name="baidu-site-verification" content="HBrapLOndy" />
  
  <meta name="keywords" content="许嵩老公" />
  
  <meta name="description" content="作业的核心应用程序通常实现Mapper和Reducer接口以提供map和reduce方法。 这些构成了job（作业）的核心。 MapperMapper将输入的键&#x2F;值对key&#x2F;value映射为一组中间键&#x2F;值对key&#x2F;value。映射是将输入记录转换为中间记录的单个任务。 转换后的中间记录不必与输入记录具有相同的类型。 给定的输入对可能映射为零或许多输出对。 Hadoop MapR">
<meta property="og:type" content="article">
<meta property="og:title" content="MapReduce用户接口Mapper、Reducer——job的核心">
<meta property="og:url" content="https://xiaoyan94.github.io/2020/06/27/MapReduce-Payload-core-of-the-job/index.html">
<meta property="og:site_name" content="空城盼故人">
<meta property="og:description" content="作业的核心应用程序通常实现Mapper和Reducer接口以提供map和reduce方法。 这些构成了job（作业）的核心。 MapperMapper将输入的键&#x2F;值对key&#x2F;value映射为一组中间键&#x2F;值对key&#x2F;value。映射是将输入记录转换为中间记录的单个任务。 转换后的中间记录不必与输入记录具有相同的类型。 给定的输入对可能映射为零或许多输出对。 Hadoop MapR">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-06-27T12:40:01.000Z">
<meta property="article:modified_time" content="2020-06-27T12:42:52.791Z">
<meta property="article:author" content="许嵩老公">
<meta property="article:tag" content="Hadoop">
<meta property="article:tag" content="MapReduce">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="../../../../atom.xml" title="空城盼故人" type="application/atom+xml">
  
  
    <link rel="icon" href="https://q1.qlogo.cn/g?b=qq&nk=979727728&s=640">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="../../../../css/style.css">

  
<link rel="stylesheet" href="../../../../css/highlight.css">

<meta name="generator" content="Hexo 4.2.1"></head>

<body>
  <div id="fullpage" class="mobile-nav-right">
    <div class="fixed"></div>
    
      <div id="wrapper">
    
    
      <header id="header">
  <div id="nav-toggle" class="nav-toggle"></div>
  <div class="head-box global-width">
    <nav class="nav-box nav-right">
      
        <a class="nav-item" href="../../../../index.html" title
        
        >首页</a>
      
        <a class="nav-item" href="../../../../archives" title
        
        >归档</a>
      
        <a class="nav-item" href="../../../../quick-notes" title
        
        >小抄</a>
      
        <a class="nav-item" href="../../../../about" title
        
        >关于</a>
      
    </nav>
  </div>
</header>
      <div id="middlecontent" title class="global-width sidebar-right">
        <section id="main"><article id="post-MapReduce-Payload-core-of-the-job" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 class="article-title" itemprop="name">
      MapReduce用户接口Mapper、Reducer——job的核心
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="" class="article-date">
  <time datetime="2020-06-27T12:40:01.000Z" itemprop="datePublished">2020-06-27</time>
</a>
    
    
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="../../../../tags/Hadoop/" rel="tag">Hadoop</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="../../../../tags/MapReduce/" rel="tag">MapReduce</a></li></ul>

  </div>
  
    <span id="busuanzi_container_page_pv">
      本文总阅读量<span id="busuanzi_value_page_pv"></span>次
    </span>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud" itemprop="articleBody">
      
        
        <h2 id="作业的核心"><a href="#作业的核心" class="headerlink" title="作业的核心"></a>作业的核心</h2><p>应用程序通常实现<code>Mapper</code>和<code>Reducer</code>接口以提供<code>map</code>和<code>reduce</code>方法。 这些构成了<code>job</code>（作业）的核心。</p>
<h3 id="Mapper"><a href="#Mapper" class="headerlink" title="Mapper"></a><code>Mapper</code></h3><p><code>Mapper</code>将输入的键&#x2F;值对<code>key/value</code>映射为一组中间键&#x2F;值对<code>key/value</code>。映射是将输入记录转换为中间记录的单个任务。 转换后的中间记录不必与输入记录具有相同的类型。 给定的输入对可能映射为零或许多输出对。</p>
<p>Hadoop MapReduce框架为每个InputSplit生成一个map任务。InputSplit是由InputFormat生成的。</p>
<p>总体而言，<code>Mapper</code> 的实现类要传递给 <code>Job</code> 使用，须调用 <code>Job.setMapperClass(Class)</code> 方法设置job的map函数；然后，MP框架为该任务的 <code>InputSplit</code> 中的每个键&#x2F;值对调用<code>map(WritableComparable,Writable,Context)</code>方法。 然后，应用程序可以重写<code>cleanup(Context)</code>方法来执行任何必需的清理。</p>
<p><code>map函数</code>的输出对的类型不一定要与输入对的类型一样。 给定的输入对可能 map 映射为零或许多个输出对。 通过调用 <code>context.write(WritableComparable, Writable)</code> 方法来收集输出对。</p>
<p><code>Application应用程序</code>可以使用<code>Counter</code>来报告它的统计信息。</p>
<p>与给定输出键 <code>key</code> 相关联的所有中间值 <code>values</code> 随后被MR框架分组，然后传递给 <code>Reducer</code> 以得到最终输出。用户可以通过 <code>Job.setGroupingCompatorClass(Class)</code> 方法指定一个 <code>Comparator</code> 来控制分组。</p>
<p>对<code>Mapper</code>的输出进行排序，然后按每个<code>Reducer</code>进行划分（<code>partition</code>）。分区(<code>partitions</code>) 的总数与作业（<code>job</code>）的<code>reduce</code>任务数相同。</p>
<p>用户可以通过实现自定义的 <code>Partitioner</code> 类来控制哪些键 <code>key</code> (以及记录 <code>records</code> )进入哪个<code>Reducer</code>进行处理。</p>
<p>用户还可以通过 <code>Job.setCombinerClass(Class)</code> 方法指定一个 <code>Combiner</code> ，以在本地执行中间输出的聚合（local aggregation）操作，这样可以减少<code>Mapper</code>到<code>Reducer</code>之间的数据传输量。实际上就是在<code>map</code>操作之后，在本地再执行一次 <code>reduce</code>操作，可以参考前面写的<code>PartitionApp</code>类的代码。</p>
<p>The intermediate, sorted outputs are always stored in a simple (key-len, key, value-len, value) format. Applications can control if, and how, the intermediate outputs are to be compressed and the <a href="https://archive.cloudera.com/cdh5/cdh/5/hadoop-2.6.0-cdh5.7.0/api/org/apache/hadoop/io/compress/CompressionCodec.html" target="_blank" rel="noopener"><code>CompressionCodec</code></a> to be used via the <code>Configuration</code>.</p>
<blockquote>
<p>原文是这样，这句话不是很理解。</p>
</blockquote>
<h4 id="多少个-Map"><a href="#多少个-Map" class="headerlink" title="多少个 Map"></a>多少个 <code>Map</code></h4><p><code>map</code> 的数量通常由输入的总大小（即输入文件的块总数 <code>the total number of blocks of the input files</code>）决定。</p>
<p><code>map</code> 的正确并行度似乎是每个节点大约10-100个 <code>map</code> ，尽管已经为 <code>very cpu-light map</code>（<em>CPU非常轻的任务</em>）任务设置了300个<code>map</code>。 因为任务的设置需要一段时间，所以执行<code>map</code>的时间最好满足至少一分钟。</p>
<p>因此，如果您期望的输入数据大小为10TB，块大小为128MB，那么最终将获得82,000个映射<code>map</code>, （<code>10 * 1024 * 1024 ÷ 128 = 81920</code>），除非使用 <code>Configuration.set(MRJobConfig.NUM_MAPS, int)</code>(它只给框架提供了一个提示 <code>hint</code>)将其设置得更高。</p>
<h3 id="Reducer"><a href="#Reducer" class="headerlink" title="Reducer"></a><code>Reducer</code></h3><p><a href="https://archive.cloudera.com/cdh5/cdh/5/hadoop-2.6.0-cdh5.7.0/api/org/apache/hadoop/mapreduce/Reducer.html" target="_blank" rel="noopener"><code>Reducer</code></a> 将同一个 <code>key</code> 对应的一组中间值的集合归约为一个更小的<code>values</code>的集合。</p>
<p>用户通过 <code>Job.setNumReduceTasks(int)</code> 方法设置作业的 <code>reduce</code>的数量。</p>
<p>相似地，<code>Reducer</code> 的实现类要传递给 <code>Job</code> 使用，须调用 <code>Job.setReducerClass(Class)</code> 方法设置job的<code>reduce</code>函数；然后，MP框架为分组输入（grouped inputs）中的每个键&#x2F;值对调用<code>reduce(WritableComparable, Iterable&lt;Writable&gt;, Context)</code>方法。 然后，应用程序可以重写<code>cleanup(Context)</code>方法来执行任何必需的清理。</p>
<p><code>Reducer</code> 主要有三个主要阶段：<code>shuffle</code>, <code>sort</code> 和 <code>reduce</code>。</p>
<h4 id="Shuffle"><a href="#Shuffle" class="headerlink" title="Shuffle"></a><code>Shuffle</code></h4><p><code>Reducer</code> 的输入是 <code>Mapper</code> 的排序输出。在这个阶段，MP框架通过HTTP获取所有<code>mapper</code>输出的相关的分区（relevant partition）。</p>
<h4 id="Sort"><a href="#Sort" class="headerlink" title="Sort"></a><code>Sort</code></h4><p>在此阶段，框架按键 <code>key</code>对Reducer的输入进行分组(因为不同的<code>mapper</code>可能输出相同的键<code>key</code>)。<code>shuffle</code>和<code>sort</code>阶段同时发生；当获取mapper的输出时，它们被合并。</p>
<h4 id="Secondary-Sort"><a href="#Secondary-Sort" class="headerlink" title="Secondary Sort"></a><code>Secondary Sort</code></h4><p>如果 <em>将中间键分组的等价规则</em> 与 <em>归约前的键分组的等价规则</em> 需要不同，则可以通过 <code>Job.setSortCompatorClass(Class)</code> 指定一个 <code>Comparator</code>。由于 <code>Job.setGroupingComparatorClass(Class)</code>能够用来控制中间键（intermediate keys）的分组方式，这些可以被结合起来以模拟对值<code>values</code>的二次排序 <code>secondary sort</code>。</p>
<h4 id="Reduce"><a href="#Reduce" class="headerlink" title="Reduce"></a><code>Reduce</code></h4><p>在这个阶段对分组输入中的所有<code>&lt;key, (list of values)&gt; pair</code>调用 <code>reduce(WritableComparable, Iterable&lt;Writable&gt;, Context)</code>方法。</p>
<p><code>reduce</code>任务的输出通常通过 <code>Context.write(WritableComparable,Writable)</code>写入HDFS文件系统（<a href="https://archive.cloudera.com/cdh5/cdh/5/hadoop-2.6.0-cdh5.7.0/api/org/apache/hadoop/fs/FileSystem.html" target="_blank" rel="noopener"><code>FileSystem</code></a>）。</p>
<p>和<code>Map</code>一样，<code>Applications</code>可以使用<code>Counter</code>来报告它的统计信息。</p>
<p><code>Reducer</code>的输出是没有经过排序的。</p>
<h4 id="多少个-Reduce"><a href="#多少个-Reduce" class="headerlink" title="多少个 Reduce"></a>多少个 <code>Reduce</code></h4><p>正确的 <code>reduce</code> 数似乎是 <code>0.95或1.75乘以(&lt;no.of nodes&gt; * &lt;no.of maximum containers per node&gt;)</code> 。</p>
<p>对于0.95，所有的<code>reduce</code>都可以立即启动，并在<code>map</code>完成时开始传输<code>map</code>输出。对于1.75，速度更快的节点将完成他们的第一轮<code>reduce</code>，并启动第二轮<code>reduce</code>，在负载均衡方面做得更好。</p>
<p>增加<code>reduce</code>的数量，会增加框架的开销，但是也增加了负载均衡和降低了故障成本。</p>
<p>上面的缩放因子（如0.95,1.95）略小于整数 ( <a href="https://www.mathsisfun.com/whole-numbers.html" target="_blank" rel="noopener"><code>whole numbers</code></a> )，以便在框架中为推测性任务和失败任务保留少部分的<code>reduce</code>插槽（<em>reduce slots</em>）。</p>
<h4 id="Reducer-NONE"><a href="#Reducer-NONE" class="headerlink" title="Reducer NONE"></a>Reducer NONE</h4><p>如果不需要归约是可以将reduce tasks的数量设置为0的。</p>
<p>在这种情况下，map tasks的输出将直接写到FileSystem，输出的路径是通过 <code>FileOutputFormat.setOutputPath(Job, Path)</code>方法设置的路径。框架不会在将map的输出写到FileSystem之前对它们进行排序。</p>
<h3 id="Partitioner"><a href="#Partitioner" class="headerlink" title="Partitioner"></a><code>Partitioner</code></h3><p><code>Partitioner</code>对<code>key</code>空间进行划分。</p>
<p><code>Partitioner</code>控制map的中间输出的keys的划分。key或key的子集通常通过hash散列函数得到划分分区（partitions）。partitions的总数与<code>reduce</code>任务数相同。因此，这控制了中间<code>key</code>(以及记录<code>record</code>)被发送到m个reduce任务中哪一个reduce任务进行归约操作。</p>
<p><a href="https://archive.cloudera.com/cdh5/cdh/5/hadoop-2.6.0-cdh5.7.0/api/org/apache/hadoop/mapreduce/lib/partition/HashPartitioner.html" target="_blank" rel="noopener"><code>HashPertitioner</code></a>是默认的<code>Partitioner</code>。</p>
<h3 id="Counter"><a href="#Counter" class="headerlink" title="Counter"></a><code>Counter</code></h3><p><a href="https://archive.cloudera.com/cdh5/cdh/5/hadoop-2.6.0-cdh5.7.0/api/org/apache/hadoop/mapreduce/Counter.html" target="_blank" rel="noopener"><code>Counter</code></a>是MapReduce应用程序报告其统计信息的工具。<code>Mapper</code>和<code>Reducer</code>的实现类可以使用<code>Counter</code>报告统计信息。</p>
<p>Hadoop Mapreduce提供了一个library，<a href="https://archive.cloudera.com/cdh5/cdh/5/hadoop-2.6.0-cdh5.7.0/api/org/apache/hadoop/mapreduce/package-summary.html" target="_blank" rel="noopener"><code>org.apache.hadoop.mapreduce</code></a>包含有用的 mappers, reducers, partitioners。</p>

          
      
    </div>
    
    
      <footer class="article-footer">
        完
      </footer>
    
  </div>
  
    
<nav id="article-nav">
  <div class="article-nav-block">
    
      <a href="../../28/10000-access-log/" id="article-nav-newer" class="article-nav-link-wrap">
        <strong class="article-nav-caption"></strong>
        <div class="article-nav-title">
          
            10000_access.log 慕课网用户行为日志文件下载
          
        </div>
      </a>
    
  </div>
  <div class="article-nav-block">
    
      <a href="../Java-import-static/" id="article-nav-older" class="article-nav-link-wrap">
        <div class="article-nav-title">Java中的静态导入import static（导入类的静态成员）</div>
        <strong class="article-nav-caption"></strong>
      </a>
    
  </div>
</nav>

    <!-- <link rel="stylesheet" href="/css/gitment.css">  -->
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>

<div id="vcommentsContainer"></div>
<!--引用评论框输入特效js文件-->

<script src="../../../../js/shuru.js"></script>

<script>
  POWERMODE.colorful = true; // make power mode colorful
  POWERMODE.shake = true; // turn off shake
  document.body.addEventListener('input', POWERMODE);
</script>
<!-- valine评论系统 -->
<script>
  new Valine({
      el: '#vcommentsContainer',
      appId: 'AttjBiS7UwxkxjV1CSrNywoi-gzGzoHsz',
      appKey: 'F50aWycFFmAPLC8CfSW7rXdP',
      avatar: 'monsterid',
      enableQQ: true,
      placeholder: '昵称处填QQ号自动抓取网名和邮箱哟~'
  })
</script>


    <!-- <link rel="stylesheet" href="/css/gitment.css"> 
<script src="/js/gitment.js"></script>

<div id="gitmentContainer"></div>

<script>
var gitment = new Gitment({
  owner: '',
  repo: '',
  oauth: {
    client_id: '',
    client_secret: '',
  },
})
gitment.render('gitmentContainer')
</script>

 -->

  
  
</article>
</section>
        <aside id="sidebar">
  
    <div class="widget-box">
  <div class="avatar-box">
    <img class="avatar" src="https://q1.qlogo.cn/g?b=qq&amp;nk=979727728&amp;s=640" title="图片来自QQ"></img>
    <h3 class="avatar-name">
      
        许嵩老公
      
    </h3>
    <p class="avatar-slogan">
      深吸一口梦，吹个气球存起来。
    </p>
  </div>
</div>


  
    

  
    
  <div class="widget-box">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/NET/" rel="tag">.NET</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Cookie/" rel="tag">Cookie</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/ES6/" rel="tag">ES6</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Git-Bash/" rel="tag">Git Bash</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Github/" rel="tag">Github</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Github-Actions/" rel="tag">Github Actions</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/HDFS/" rel="tag">HDFS</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/HTTP/" rel="tag">HTTP</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Hadoop/" rel="tag">Hadoop</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Hexo/" rel="tag">Hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Idea/" rel="tag">Idea</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/JVM/" rel="tag">JVM</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Java/" rel="tag">Java</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/JavaScript/" rel="tag">JavaScript</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Linux/" rel="tag">Linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/MapReduce/" rel="tag">MapReduce</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Markdown/" rel="tag">Markdown</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Maven/" rel="tag">Maven</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Node/" rel="tag">Node</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Node-js/" rel="tag">Node.js</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/SQL/" rel="tag">SQL</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Serial-Port/" rel="tag">Serial Port</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Shell/" rel="tag">Shell</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/SpringBoot/" rel="tag">SpringBoot</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/TCP/" rel="tag">TCP</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/VSCode/" rel="tag">VSCode</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/Vue/" rel="tag">Vue</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/WebSocket/" rel="tag">WebSocket</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/YARN/" rel="tag">YARN</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/hexo/" rel="tag">hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/macOS/" rel="tag">macOS</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/ssh/" rel="tag">ssh</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E4%B8%AD%E6%96%87%E4%B9%B1%E7%A0%81/" rel="tag">中文乱码</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E5%A4%A7%E6%95%B0%E6%8D%AE/" rel="tag">大数据</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/" rel="tag">安装教程</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E5%AF%86%E9%92%A5/" rel="tag">密钥</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E5%B9%B6%E8%A1%8C%E7%BC%96%E7%A8%8B/" rel="tag">并行编程</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E6%95%B0%E6%8D%AE%E5%BA%93/" rel="tag">数据库</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E7%94%B5%E8%84%91/" rel="tag">电脑</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E7%AB%B9%E4%BA%91/" rel="tag">竹云</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E7%BB%88%E7%AB%AF/" rel="tag">终端</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E8%84%9A%E6%9C%AC/" rel="tag">脚本</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E8%BD%AC%E8%BD%BD/" rel="tag">转载</a></li><li class="tag-list-item"><a class="tag-list-link" href="../../../../tags/%E8%BD%AF%E4%BB%B6/" rel="tag">软件</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-box">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="../../../../tags/NET/" style="font-size: 10px;">.NET</a> <a href="../../../../tags/Cookie/" style="font-size: 10px;">Cookie</a> <a href="../../../../tags/ES6/" style="font-size: 10px;">ES6</a> <a href="../../../../tags/Git-Bash/" style="font-size: 11.67px;">Git Bash</a> <a href="../../../../tags/Github/" style="font-size: 13.33px;">Github</a> <a href="../../../../tags/Github-Actions/" style="font-size: 10px;">Github Actions</a> <a href="../../../../tags/HDFS/" style="font-size: 10px;">HDFS</a> <a href="../../../../tags/HTTP/" style="font-size: 11.67px;">HTTP</a> <a href="../../../../tags/Hadoop/" style="font-size: 18.33px;">Hadoop</a> <a href="../../../../tags/Hexo/" style="font-size: 10px;">Hexo</a> <a href="../../../../tags/Idea/" style="font-size: 10px;">Idea</a> <a href="../../../../tags/JVM/" style="font-size: 18.33px;">JVM</a> <a href="../../../../tags/Java/" style="font-size: 20px;">Java</a> <a href="../../../../tags/JavaScript/" style="font-size: 16.67px;">JavaScript</a> <a href="../../../../tags/Linux/" style="font-size: 15px;">Linux</a> <a href="../../../../tags/MapReduce/" style="font-size: 11.67px;">MapReduce</a> <a href="../../../../tags/Markdown/" style="font-size: 10px;">Markdown</a> <a href="../../../../tags/Maven/" style="font-size: 13.33px;">Maven</a> <a href="../../../../tags/Node/" style="font-size: 10px;">Node</a> <a href="../../../../tags/Node-js/" style="font-size: 10px;">Node.js</a> <a href="../../../../tags/SQL/" style="font-size: 13.33px;">SQL</a> <a href="../../../../tags/Serial-Port/" style="font-size: 10px;">Serial Port</a> <a href="../../../../tags/Shell/" style="font-size: 11.67px;">Shell</a> <a href="../../../../tags/SpringBoot/" style="font-size: 10px;">SpringBoot</a> <a href="../../../../tags/TCP/" style="font-size: 10px;">TCP</a> <a href="../../../../tags/VSCode/" style="font-size: 10px;">VSCode</a> <a href="../../../../tags/Vue/" style="font-size: 10px;">Vue</a> <a href="../../../../tags/WebSocket/" style="font-size: 11.67px;">WebSocket</a> <a href="../../../../tags/YARN/" style="font-size: 10px;">YARN</a> <a href="../../../../tags/hexo/" style="font-size: 11.67px;">hexo</a> <a href="../../../../tags/macOS/" style="font-size: 11.67px;">macOS</a> <a href="../../../../tags/ssh/" style="font-size: 11.67px;">ssh</a> <a href="../../../../tags/%E4%B8%AD%E6%96%87%E4%B9%B1%E7%A0%81/" style="font-size: 10px;">中文乱码</a> <a href="../../../../tags/%E5%A4%A7%E6%95%B0%E6%8D%AE/" style="font-size: 10px;">大数据</a> <a href="../../../../tags/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/" style="font-size: 10px;">安装教程</a> <a href="../../../../tags/%E5%AF%86%E9%92%A5/" style="font-size: 10px;">密钥</a> <a href="../../../../tags/%E5%B9%B6%E8%A1%8C%E7%BC%96%E7%A8%8B/" style="font-size: 10px;">并行编程</a> <a href="../../../../tags/%E6%95%B0%E6%8D%AE%E5%BA%93/" style="font-size: 10px;">数据库</a> <a href="../../../../tags/%E7%94%B5%E8%84%91/" style="font-size: 11.67px;">电脑</a> <a href="../../../../tags/%E7%AB%B9%E4%BA%91/" style="font-size: 11.67px;">竹云</a> <a href="../../../../tags/%E7%BB%88%E7%AB%AF/" style="font-size: 13.33px;">终端</a> <a href="../../../../tags/%E8%84%9A%E6%9C%AC/" style="font-size: 10px;">脚本</a> <a href="../../../../tags/%E8%BD%AC%E8%BD%BD/" style="font-size: 10px;">转载</a> <a href="../../../../tags/%E8%BD%AF%E4%BB%B6/" style="font-size: 10px;">软件</a>
    </div>
  </div>

  
    
  <div class="widget-box">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2023/02/">二月 2023</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2023/01/">一月 2023</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2022/11/">十一月 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2022/09/">九月 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2022/08/">八月 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2021/12/">十二月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2021/02/">二月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2021/01/">一月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2020/08/">八月 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2020/07/">七月 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="../../../../archives/2020/06/">六月 2020</a></li></ul>
    </div>
  </div>

  
    
  <div class="widget-box">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="../../../../2023/02/13/%E4%BD%BF%E7%94%A8Node-js%E5%90%8E%E5%8F%B0%E8%AF%BB%E5%8F%96%E4%B8%B2%E5%8F%A3%E6%95%B0%E6%8D%AE%E5%B9%B6%E9%80%9A%E8%BF%87WebSocket%E5%AE%9E%E6%97%B6%E6%98%BE%E7%A4%BA%E5%9C%A8%E7%BD%91%E9%A1%B5%E4%B8%8A/">使用Node.js后台读取串口数据并通过WebSocket实时显示在网页上</a>
          </li>
        
          <li>
            <a href="../../../../2023/02/09/%E4%BD%9C%E4%B8%BA%E7%94%A8%E6%88%B7%EF%BC%8C%E4%BF%AE%E6%94%B9Cookie%E6%9C%89%E6%95%88%E6%9C%9F%EF%BC%8C%E5%BB%B6%E9%95%BFCookie%E6%9C%9F%E9%99%90/">作为用户，修改Cookie有效期，延长Cookie期限</a>
          </li>
        
          <li>
            <a href="../../../../2023/02/08/%E7%BB%88%E7%AB%AF%E5%91%BD%E4%BB%A4%E4%BB%A3%E7%90%86/">终端命令网络设置</a>
          </li>
        
          <li>
            <a href="../../../../2023/01/18/Windows%E7%B3%BB%E7%BB%9FC%E7%9B%98%E6%B8%85%E7%90%86%E5%B7%A5%E5%85%B7FreeMove%E5%8F%8A%E6%96%87%E4%BB%B6%E5%8D%A0%E7%94%A8%E8%BF%9B%E7%A8%8B%E6%9F%A5%E7%9C%8B%E8%BD%AF%E4%BB%B6LockHunter%E9%85%8D%E5%90%88%E4%BD%BF%E7%94%A8/">Windows系统C盘清理工具FreeMove及文件占用进程查看软件LockHunter配合使用</a>
          </li>
        
          <li>
            <a href="../../../../2023/01/14/AutoReconnectWiFi/">检测断网自动重连WiFi脚本</a>
          </li>
        
      </ul>
    </div>
  </div>

  
      <div class="widget-box">
    <h3 class="widget-title">友链</h3>
    <div class="widget">
      
        <!-- <a style="display: block;" href="../../../../https:/xiaoyan94.github.io/" title target='_blank' -->
        <a style="display: block;" href="https://xiaoyan94.github.io/" title target='_blank'
        >Github Pages</a>
      
        <!-- <a style="display: block;" href="../../../../https:/xy94.gitee.io/" title target='_blank' -->
        <a style="display: block;" href="https://xy94.gitee.io/" title target='_blank'
        >Gitee Pages</a>
      
    </div>
  </div>

  
 
  
</aside>
      </div>
      <footer id="footer">
  <div class="foot-box global-width center">
    &copy; 2023 许嵩老公 &nbsp;&nbsp;
    Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    &nbsp;|&nbsp;主题 <a href="https://github.com/yiluyanxia/hexo-theme-antiquity" target="_blank" rel="noopener">antiquity</a>
    <br>
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span id="busuanzi_container_site_pv">不蒜子告之   阁下是第<span id="busuanzi_value_site_pv"></span>个访客</span>
    
  </div>
  
  <!--引入文字点击特效-->
  <script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
  
<script src="../../../../js/dianji.js"></script>

</footer>

<!--添加回到顶部按钮-->
<style>
/* 小猫置顶 */
/* 自定义回到顶部样式 */
.cd-top {
  position: fixed;
  right: 25px;
  top: -900px;
  z-index: 99;
  width: 70px;
  height: 900px;
  /* background: url(https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/scroll.png) no-repeat center; */
  background: url(/images/scroll.png) no-repeat center;
  background-size: contain;
  -webkit-transition: all .5s ease-in-out;
  transition: all .5s ease-in-out;
  /* cursor: url(https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/cursor/No_Disponible.cur), auto; */
  cursor: url(/images/cursor/No_Disponible.cur), auto;
  opacity: 1
}

.cd-top.cd-is-visible {
  opacity: 1;
  top: -326px
}

.cd-top.cd-fade-out {
  opacity: 1
}

.cd-top:hover {
  opacity: 1
}

.cd-top span {
  display: none;
  color: #000;
  position: absolute;
  bottom: 0;
  height: 20px;
  width: 50px;
  text-align: center
}

@media screen and (max-width:860px) {
  .cd-top {
      display: none;
      height: 60px;
      width: 50px
  }
  .cd-top span {
      height: 10px;
      width: 50px
  }
}

#moblieGoTop {
  display: none;
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 99;
  border: 0;
  outline: 0;
  background-color: #fff;
  color: #404040;
  cursor: pointer;
  padding: 15px;
  border-radius: 10px;
  border-radius: 12px;
  box-shadow: 0 0 2px 0 rgba(0, 0, 0, .12), 0 2px 2px 0 rgba(0, 0, 0, .24);
  transition: box-shadow .2s ease
}
#moblieGoTop:hover {
  background-color: #fff;
  opacity: .8
}
.changeSkin-gear {
  position: fixed;
  bottom: 0;
  left: auto;
  right: 5px;
  width: auto;
  height: auto;
  z-index: 99;
  white-space: nowrap;
  padding: 10px 10px;
  cursor: pointer;
  border-radius: 10px 10px 0 0
}
</style>

<!-- 添加小猫置顶 -->
<a class="cd-top faa-float animated cd-is-visible cd-fade-out" style="top: -500px;"></a>
<button id="moblieGoTop" title="Go to top" style="display: none;font-size: xx-large;"><i class="fa fa-chevron-up" aria-hidden="true"></i>🔝</button>

<!-- <div class="scroll "> <i class="fa fa-arrow-up" style="margin-left: 4px;"></i>
Top⬆️
<span class="scrollpercent" style="margin-left: -2px;"></span>
<span style="margin-right: 4px; margin-left: -4px;">%</span>
</div> -->

<!-- https://www.huangpinke.com/2018/08/24/add-back-to-top-button.html -->
      <script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
<script>
if (!window.jQuery) {
var script = document.createElement('script');
script.src = "/js/jquery-2.0.3.min.js";
document.body.write(script);
}
</script>

  
<link rel="stylesheet" href="../../../../fancybox/jquery.fancybox.css">

  
<script src="../../../../fancybox/jquery.fancybox.pack.js"></script>




<script src="../../../../js/script.js"></script>




<script>
  (function(){
      var bp = document.createElement('script');
      bp.src = '//push.zhanzhang.baidu.com/push.js';
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
  })();
  </script>

<!-- mermaid图 -->

  <script src='https://unpkg.com/mermaid@7.1.2/dist/mermaid.min.js'></script>
  <script>
    if (window.mermaid) {
      mermaid.initialize({theme: 'forest'});
    }
  </script>

    </div>
    <nav id="mobile-nav" class="mobile-nav-box">
  <div class="mobile-nav-img mobile-nav-top"></div>
  
    <a href="../../../../index.html" class="mobile-nav-link">首页</a>
  
    <a href="../../../../archives" class="mobile-nav-link">归档</a>
  
    <a href="../../../../quick-notes" class="mobile-nav-link">小抄</a>
  
    <a href="../../../../about" class="mobile-nav-link">关于</a>
  
  <div class="mobile-nav-img  mobile-nav-bottom"></div>
</nav>    
  </div>
</body>

</html>